package g11.dao;

import g11.model.Appointment;
import g11.model.Employee;
import g11.model.Patient;

import java.sql.Date;
import java.util.List;

import org.hibernate.Session;

public interface AppointmentDAO {
	public Session getSession();

	public void cleanup();

	// public boolean getApptConflictByDoctorId(int doctorId, Date time) throws
	// DAOException;
	public Appointment getAppointmentById(Integer appointmentId)
			throws DAOException;

	public List<Appointment> getAppointmentByPatient(Patient patient)
			throws DAOException;

	public List<Appointment> getPendingAppointmentByDoctor(Employee doctor)
			throws DAOException;

	public List<Appointment> getTodayAppointmentByDoctor(Employee doctor)
			throws DAOException;

	public List<Appointment> getVisitedAppointmentByTimePeriod(Date startDate,
			Date endDate) throws DAOException;

	public List<Appointment> getVisitedAppointmentByDoctorAndTimePeriod(
			Date startDate, Date endDate, Employee doctor) throws DAOException;

	public List<Appointment> getVisitedAppointmentByPatientAndTimePeriod(
			Date startDate, Date endDate, Patient patient) throws DAOException;

	public List<Appointment> getPendingAppointmentByPatient(Patient patient)
			throws DAOException;

	public Integer createAppointment(Appointment appointment)
			throws DAOException;

	public void updateAppointment(Appointment appointment) throws DAOException;

	public void deleteAppointment(Appointment appointment) throws DAOException;

	public List<Appointment> getAllVisitedAppointmentByDoctor(Employee doctor)
			throws DAOException;

	public List<Appointment> getAllVisitedAppointmentByPatient(Patient patient)
			throws DAOException;
}
